<style>
p img{max-width:160px; height:90px; margin:5px}
</style>

<input type="hidden" name="link.id" value="#(link.id)">
<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">状态</label>
		<div class="layui-input-inline">
			<input type="radio" name="link.status" value="on" title="启用" #if(link.status == 'on' || link.status == null) checked #end>
			<input type="radio" name="link.status" value="off" title="禁用" #if(link.status == 'off') checked #end>
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">排序</label>
		<div class="layui-input-inline">
			<input type="text" name="link.sortNum" lay-verify="required|number" autocomplete="off" class="layui-input" value="#(link.sortNum)">
		</div>
	</div>
</div>
<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">标题</label>
		<div class="layui-input-inline">
			<input type="text" name="link.title" lay-verify="required|title" placeholder="请输入标题" autocomplete="off" class="layui-input" value="#(link.title)">
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">分类</label>
		<div class="layui-input-inline">
			<select name="link.categoryId" lay-verify="required">
				<option value="">-- 请选择 --</option>
				#for(linkCategory : linkCategoryList)
				<option value="#(linkCategory.id)" #if(linkCategory.id == link.categoryId) selected #end>#(linkCategory.name)</option>
				#end
			</select>
		</div>
	</div>
</div>

<div class="layui-tab layui-tab-brief"">
	<ul class="layui-tab-title">
		<li class="layui-this"><i class="layui-icon layui-icon-website"></i>  桌面端</li>
		<li><i class="layui-icon layui-icon-cellphone"></i>  移动端</li>
	</ul>
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
			<div class="layui-form-item">
				<label class="layui-form-label">链接</label>
				<div class="layui-input-block">
					<input type="text" name="link.url" placeholder="链接" autocomplete="off" class="layui-input" value="#(link.url)">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">图片</label>
				<div class="layui-input-inline">
					<input type="hidden" id="ID_link_img_url" name="link.img" value="#(link.img)">
					<button type="button" class="layui-btn jfsa-select-image" id="ID_link_img_upload" jfsa-input="ID_link_img_url" jfsa-img="ID_link_img_img">设置</button>
					<p><img src="#(link.img)" id="ID_link_img_img"></p>
				</div>
			</div>
		</div>
		<div class="layui-tab-item">
			<blockquote class="layui-elem-quote">内容为空时采用桌面端内容</blockquote>
			<div class="layui-form-item">
				<label class="layui-form-label">链接</label>
				<div class="layui-input-block">
					<input type="text" name="link.urlH5" placeholder="移动端链接，不填写则使用桌面端设置" autocomplete="off" class="layui-input" value="#(link.urlH5)">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">图片</label>
				<div class="layui-input-inline">
					<input type="hidden" id="ID_link_img_h5_url" name="link.imgH5" value="#(link.imgH5)">
					<button type="button" class="layui-btn jfsa-select-image" id="ID_link_img_h5_upload" jfsa-input="ID_link_img_h5_url" jfsa-img="ID_link_img_h5_img">设置</button>
					<p><img src="#(link.imgH5)" id="ID_link_img_h5_img"></p>
				</div>
			</div>
		</div>
	</div>
</div>
